﻿namespace FATEFAKE
{
    #region using directives
    #endregion

    internal class FateCommand
    {
        private string testName;
        private string command;
        private string cmp;
        private string reference;
        private string cmpUnit;
        private string cmpShift;
        private string fuzz;
        private string sizeTolerance;
        private string cmpTarget;

        /// <summary>
        /// Initializes a new instance of the FateCommand class.
        /// </summary>
        /// <param name="testName">
        /// The test name (argument 1). 
        /// </param>
        /// <param name="command">       
        /// The command (argument 5). 
        /// </param>
        /// <param name="cmp">           
        /// The cmp (argument 6). 
        /// </param>
        /// <param name="reference">     
        /// The reference (argument 7). 
        /// </param>
        /// <param name="cmpUnit">       
        /// The cmp unit (argument 15). </param>
        /// <param name="cmpShift">      
        /// The cmp shift (argument 12). </param>
        /// <param name="fuzz">          
        /// The fuzz (argument 8). </param>
        /// <param name="sizeTolerance"> 
        /// The size tolerance (argument 14). 
        /// </param>
        /// <param name="cmpTarget">     
        /// The cmp target (argument 13).
        /// </param>
        public FateCommand(
                    string testName, 
                    string command, 
                    string cmp, 
                    string reference, 
                    string cmpUnit, 
                    string cmpShift, 
                    string fuzz, 
                    string sizeTolerance, 
                    string cmpTarget)
        {
            this.testName = testName;
            this.command = command;
            this.cmp = cmp;
            this.reference = reference;
            this.cmpUnit = cmpUnit;
            this.cmpShift = cmpShift;
            this.fuzz = fuzz;
            this.sizeTolerance = sizeTolerance;
            this.cmpTarget = cmpTarget;
        }

        public string TestName
        {
            get { return this.testName; }
        }

        public string TestNameConsolidated
        {
            get
            {
                string s = this.TestName;
                if (string.IsNullOrEmpty(s))
                {
                    return s;
                }

                if (s.StartsWith("fate-"))
                {
                    return s.Substring(5);
                }

                return s;
            }
        }

        public string Command
        {
            get { return this.command; }
        }

        public string Cmp
        {
            get { return this.cmp; }
        }

        public string Ref
        {
            get { return this.reference; }
        }

        public string CmpUnit
        {
            get { return this.cmpUnit; }
        }

        public string CmpShift
        {
            get { return this.cmpShift; }
        }

        public string Fuzz
        {
            get { return this.fuzz; }
        }

        public string SizeTolerance
        {
            get { return this.sizeTolerance; }
        }

        public string CmpTarget
        {
            get { return this.cmpTarget; }
        }
    }
}
